]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Only show count for multiple notifications
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Feb 2020 18:06:51 +0000 (19:06 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Feb 2020 19:55:33 +0000 (20:55 +0100)
In the common case where we only have a single unread notification
from a particular app, the count doesn't add useful information.
Reduce clutter a bit by only showing the notification count if we
have at least two.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/997

js/ui/unlockDialog.js

index 41d0e08cc62941fb4eb44338d7cc9d538b4e46e2..0ca62430ccc3456ce84a3e7deeefcc6f3a7d00b2 100644 (file)
@@ -99,6 +99,7 @@ var NotificationsBox = GObject.registerClass({
         let count = source.unseenCount;
         let countLabel = new St.Label({
             text: `${count}`,
+            visible: count > 1,
             style_class: 'unlock-dialog-notification-count-text',
         });
         textBox.add(countLabel);
@@ -262,6 +263,7 @@ var NotificationsBox = GObject.registerClass({
         } else {
             let count = source.unseenCount;
             obj.countLabel.text = `${count}`;
+            obj.countLabel.visible = count > 1;
         }
 
         obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);